Detect Lines (Image Processing)
Synopsis
This operator detects (straight) lines in images.Description
This operator does three operations in order to find lines in images.First the image is blurred. The reason for it is that otherwise single outliers may become an edge later on.
In the second step the Canny edge detector is used to detect edges within the image. An edge is a point where the intensity changes drastically from one pixel to the next.
Thirdly a Hough transform operation is used, to detect which edge is a line. For details on hough transform please see: https://en.wikipedia.org/wiki/Hough_transform
Input
- img
The input image to detect the lines in
Output
- lines
The image with the lines marked in them.
- edges
Output of the edge detection algorithm
- exa (Data table)
A table with all detected lines. Most importantly their start and endpoint.
- ori
The original input image.
Parameters
- kernel size Kernel size of the blurring operation.
- use edge detection heuristics If set to true the two parameters of the canny edge detection are defined by just one sensetivity. The heuristic is: lower_threshold = max(0, (1.0 - sigma) * mean); upper_threshold = min(255, (1.0 + sigma) * mean); Where mean is the mean of all pixel values and sigma is the edge_detection_sensitivity
- edge detection sensitivity Sensitivity for the edge detection. the higher the value, the more points are edges.
- higher edge detection threshold First threshold for the hysteresis procedure. The lower the number the more sensitive is the edge detection.
- lower edge detection threshold Second threshold for the hysteresis procedure. The lower the number the more sensitive is the edge detection.
- distance resolution Distance resolution of the accumulator in pixels.
- angle resolution Angle resolution of the accumulator in degrees.
- line detection sensitivity Reciprocal value of accumulator threshold parameter. Only those lines are returned that get enough votes, i.e. more votes than 1/sensitivity. The lower this value, the more line are detected.
- min line length Minimum line length. Line segments shorter than that are rejected.
- max line gap Maximum allowed gap between points on the same line to link them. The higher the number the more you accept interrupted lines as one line.